package com.base.cn.platform.os.controller.order.order;

import com.base.cn.platform.os.common.controller.BaseController;
import com.base.cn.platform.os.common.utils.result.ResultUtil;
import com.base.cn.platform.os.service.order.order.OrderBookBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.util.Map;

/**
 * 图书扩展订单Controller接口
 *
 * @author s.li
 * @create 2018-05-29-15:29
 */
@RestController
@RequestMapping("/manage/order")
public class OrderBookController extends BaseController {

    @Autowired
    private OrderBookBiz orderBookBiz;

    /**
     * 修改签收 状态
     * @param userId 用户ID
     * @param orderId 订单ID
     * @param signStatus 签收 状态，2已签收 ，1未签收
     * @return Map<String,Object>
     */
    @RequestMapping("/orderBook/updateSignStatus")
    public Map<String,Object> updateSignStatus(@RequestParam("userId") BigDecimal userId,
                                               @RequestParam("orderId") BigDecimal orderId,
                                               @RequestParam("signStatus") int signStatus){
        orderBookBiz.updateSignStatus(userId,orderId,signStatus);
        return ResultUtil.SUCCESS();
    }
}
